home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / netbsd / contrib / easyinstall-1.3s.readme < prev    next >
Text File  |  1995-10-22  |  11KB  |  273 lines

  1. Descr:     Solaris-version of EasyInstall (no, doesn't really belong here,
  2.     but i couldn't think of a better place ;-)
  3.  
  4.  
  5.     Using and making optional packages available for Solaris 
  6.     ########################################################
  7.               (C) Hubert Feyrer, Juny 14th, 1995
  8.  
  9.  
  10.        Summary:
  11.        ~~~~~~~~
  12.        This document describes how optional packages should be
  13.        structured so they can be easily installed and removed.
  14.        Furthermore,  a method for simplifying the installation
  15.        is  introduced and hints   on how to configure optional
  16.        packages are included.
  17.  
  18.  
  19. 0) Contents
  20. ~~~~~~~~~~~
  21.   0. Contents
  22.   1. Introduction
  23.      1.1 Format of packages
  24.      1.2 Accessing packages easily
  25.      1.3) Other things to do while installing packages
  26.   2. The installation process
  27.      2.1 Things done while installing
  28.      2.2 Things done while uninstalling
  29.   3. Configuring the installation process
  30.   4. A note on configuring packages
  31.   5. Additional thingies
  32.   6. Future plans
  33.   7. Disclaimer & legal stuff
  34.   8. Availability
  35.   9. Final note
  36.  
  37.  
  38. 1) Introduction
  39. ~~~~~~~~~~~~~~~
  40. As stated in an earlier posting, I'd like to see all optional packages
  41. reside in their own directory below one common directory (/usr/local).
  42. Packages are placed in subdirectories below /usr/local, with the directory
  43. name of the package giving name and version of the package,
  44. e.g. /usr/local/fvwm-1.23f, /usr/local/bash-1.14.1.
  45.  
  46.  
  47. 1.1) Format of packages
  48. ~~~~~~~~~~~~~~~~~~~~~~~
  49. Below the package-directories, files are stored in the following
  50. subdirectories:
  51.  
  52.  - binaries:             bin
  53.  - formatted man-pages:     man/cat[1-8nl]
  54.  - unformatted man-pages:     man/man[1-8nl]
  55.  - misc files:             etc
  56.  - libraries:             lib
  57.  - includes:             include
  58.  - info-files:             info
  59.  
  60. Information for installing the package is provided in the subdirectory
  61. "install", namely as a script "install.sh" for installation and
  62. (recommended) "uninstall.sh" for removing the package.
  63.  
  64.  
  65. 1.2) Accessing packages easily
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. Having several packages installed would force users to include serveral
  68. bin-directories into their $PATH, get unwieldly long $MANPATHs, ... To
  69. prevent this, files that are accessed by users are linked to some public
  70. directories below /usr/local. The directories used are exactly the same as
  71. the ones used inside the packages. Doing this has two advantages:
  72.  
  73. - easy installation of packages
  74. - users have to include only one directory into their $PATH
  75.   (/usr/local/bin), $MANPATH (/usr/local/man), ...  
  76.  
  77. This document is intended to describe a mechanism for making packages
  78. accessible via those public directories.
  79.  
  80.  
  81. 1.3) Other things to do while installing packages
  82. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83. There are also some more things to handle when installing packages,
  84. namely:
  85.  
  86.  - installing X application defaults
  87.  - making files setuid root
  88.  - creating auxiliary directories (for more libraries, includes, ...)
  89.  - Pre/Post-install scripts (not yet)
  90.  
  91.  
  92. 2) The installation process
  93. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  94. I've written some shell scripts that should help installing optional
  95. (precompiled) packages on ones system by doing the things mentioned
  96. above. All one has to do to configure the installation is to set some
  97. variables in a (shell)script that will be uses for installation as
  98. well as de-installation.
  99.  
  100.  
  101. 2.1) Things done while installing
  102. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103. The "install.sh"-script does the following things while making a package
  104. publically available:
  105.  
  106. a) If application defaults are to be installed, figure out the directory
  107.    where to put them. The following directories are searched:
  108.  
  109.     - /usr/lib/X11/app-defaults
  110.     - /usr/local/X11R6/lib/X11/app-defaults
  111.     - /usr/X11R6/lib/X11/app-defaults
  112.     - /usr/local/X11R5/lib/X11/app-defaults
  113.     - /usr/X11R5/lib/X11/app-defaults
  114.     - $BASE/X11R6/lib/X11/app-defaults 
  115.     - $BASE/X11R5/lib/X11/app-defaults
  116.  
  117.     (BASE is the directory below which packages are installed, usually
  118.      /usr/local, but can be changed, although this is not recommended)
  119.  
  120.    *NOTE: Use of this feature is not very useful if you plan on
  121.           upgrading your window-system or if you use several
  122.           window-systems concurrently (e.g. OpenWindows & MIT
  123.           X11). Make a shell-wrapper setting $XENVIRONMENT instead! 
  124.  
  125.    If no directory can be found, the user will be prompted to insert on.
  126. b) Create /usr/local and additional directories (for includes, libraries,
  127.    ...).
  128. c) Link files specified from /usr/local/<package>/bin to /usr/local/bin.
  129.    Same for files in etc, lib, man/man[1-8nl], man/cat[1-8nl], info and
  130.    include. Directories that do not exist will be created.
  131. d) Install X application defaults into the directory previously figured
  132.    out. 
  133. e) Set specified files setuid root.
  134.  
  135.  
  136. 2.2) Things done while uninstalling
  137. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  138. "uninstall.sh" performs the following tasks while removing the package from
  139. public directories:
  140.  
  141. a) Find out directory for application defaults as described above.
  142. b) Remove files from public directories: bin, etc, lib, man/man[1-8nl],
  143.    man/cat[1-8nl], info, include. After that, directories will be removed if
  144.    they are empty.
  145. c) The X application default file is removed.
  146. d) Remove misc directories for libraries, etc.
  147.  
  148. Please note: the package itself (/usr/local/<package>) is *not* removed!
  149.  
  150.  
  151. 3) Configuring the installation process
  152. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  153. The two scripts "install.sh" and "uninstall.sh" are expected to be placed
  154. in a packages "install" subdirectory. This is also the place where the two
  155. scripts look for a file "package" which describes the package.
  156.  
  157. The packag-file contains only definitions for some (environment) variables,
  158. namely:
  159.  
  160. - BASE: Base of public directories. Defaults to "/usr/local" and should not
  161.         be changed.
  162. - PKG: Absolute patch of the package, usually "$BASE/package-name".
  163. - BIN: Which files to link from $PKG/bin to $BASE/bin. Must be enclosed in 
  164.        "quotes" if more than one file is given (space-seperated).
  165. - ETC: Which files from $PKG/etc will be needed in $BASE/etc? (Note: You
  166.        should compile in /usr/local/packagename as base for packages, not
  167.        /usr/local. This way you won't have to link files into
  168.        /usr/local/etc.)
  169. - LIB: Libraries of public interrest, relative to $PKG/lib. Additional
  170.        libraries can be created by setting MISCDIRS (see below).
  171. - MAN1: which unformatted man-pages to link from $PKG/man/man1 to
  172.         $BASE/man/man1 (including ".1"-suffix!). Descriptions for general
  173.         commands go here.  
  174. - MAN2: same as MAN1 (suffix: ".2"), just for system calls.
  175. - MAN3: same as MAN1 (suffix: ".3"), just for C libraries.
  176. - MAN4: same as MAN1 (suffix: ".4"), just for device drivers.
  177. - MAN5: same as MAN1 (suffix: ".5"), just for file formats.
  178. - MAN6: same as MAN1 (suffix: ".6"), just for games.
  179. - MAN7: same as MAN1 (suffix: ".7"), just for miscellaneous things that
  180.         don't fit else where.  
  181. - MAN8: same as MAN1 (suffix: ".8"), just for system administrative
  182.         commands. 
  183. - MANN: same as MAN1 (suffix: ".n"), just for more misc (new) stuff
  184. - MANL: same as MAN1 (suffix: ".l"), just for local software
  185. - CAT1: which formatted man-pages to link from $PKG/man/cat1 to
  186.         $BASE/man/cat1 (including ".0"-suffix!). Descriptions for general 
  187.         commands go here. 
  188. - CAT2: same as CAT1 (suffix: ".0"), just for system calls.
  189. - CAT3: same as CAT1 (suffix: ".0"), just for C libraries.
  190. - CAT4: same as CAT1 (suffix: ".0"), just for device drivers.
  191. - CAT5: same as CAT1 (suffix: ".0"), just for file formats.
  192. - CAT6: same as CAT1 (suffix: ".0"), just for games.
  193. - CAT7: same as CAT1 (suffix: ".0"), just for miscellaneous things that
  194.         don't fit else where. 
  195. - CAT8: same as CAT1 (suffix: ".0"), just for system administrative commands.
  196. - CATN: same as CAT1 (suffix: ".0"), just for more misc (new) stuff
  197. - CATL: same as CAT1 (suffix: ".0"), just for local software
  198. - INFO: files to link to $BASE/info. Modification of "$BASE/info/dir"
  199.         should be done by some smart post-processing script (once these are 
  200.         implemented ;-).
  201. - APPDEF: Application default files, relative to $PKG, usually
  202.           "lib/XApp.ad". Suffix ".ad" will be stripped in link.
  203. - INCLUDE: Files to link into $BASE/include, e.g. for libraries like
  204.            readline. Additional subdirectories can be created by setting
  205.            MISCDIRS. 
  206. - SUIDROOT: Which files (relative to $PKG) to make setuid-root (just in
  207.             case tar goofed some protections/ownerships).
  208. - MISCDIRS: Which additional directories to create under $BASE. Usually for
  209.             grouping includes or libraries.
  210.  
  211.  
  212. 4.) A note on configuring packages
  213. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  214. When compiling optional packages, make the base-directory
  215. "/usr/local/package", not "/usr/local". By doing so you don't have to put
  216. every single file into public directories, but only the ones of interrest
  217. for users (usually binaries and man pages).
  218.  
  219. 5. Additional thingies
  220. ~~~~~~~~~~~~~~~~~~~~~~
  221. installedSW.pl.cgi - perl-scribt to create a WWW-page with list of
  222.           installed software (what did you expect by that name?! ;-)
  223.  
  224. 6.) Future plans
  225. ~~~~~~~~~~~~~~~~
  226. There are some things I can think of that might be useful:
  227.  
  228.  - Pre/Post-install-scripts which will be run before/after the installation
  229.    to backup files, etc.
  230.  - Some smart script to edit config-files. Useful for adding info-files to
  231.    the dir-file or think if one wants to install wu-ftpd: editing
  232.    /etc/inetd.conf by hand. :-/
  233.  - Merge NetBSD- and Solaris-version >:)
  234.  
  235.  
  236. 7.) Disclaimer & legal stuff
  237. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  238. Use at your own risk. All rights reserved. I take no responsibility for
  239. nothing. Note also (c) copyright-message in the scripts themselves:
  240.  
  241. # (c) Copyright 1994, 1995 Hubert Feyrer.
  242. # Alle Rechte vorbehalten, weitergabe an Dritte ohne schriftliche
  243. # Genehmiging des o.g. Autors ausdruecklich untersagt!
  244. # All rights reserved, distribution of this software without a written
  245. # permission of the author is hereby strictly forbidden!
  246.  
  247.  
  248. 8.) Availability
  249. ~~~~~~~~~~~~~~~~
  250. I'll put this all together into a package "EasyInstall-1.3S.tar.gz" and place
  251. it into /pub/NetBSD-Amiga/contrib on ftp.uni-regensburg.de.
  252.  
  253.  
  254. 9.) Final note
  255. ~~~~~~~~~~~~~~
  256. Call for discussion!
  257.  
  258. What do you think about all of this? Are the two scripts useful, will
  259. anyone use it? What can be improved? How about the method for detecting the
  260. appdef-dir? Are there any public directories I've missed?
  261.  
  262.  
  263.  
  264. Enjoy,
  265.  
  266.        Hubert
  267.  
  268. =============== Hubert Feyrer ============================================
  269.       Weekdays: Rennerstr. 19, D-93053 Regensburg, Tel. 0941/943-2455
  270.       Weekends: Bachstr. 40,   D-84066 Mallersdorf, Tel. 08772/6084
  271.       Internet: hubert.feyrer@rz.uni-regensburg.de == IRC: hubertf
  272. ==========================================================================
  273.